<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>报名</title>
    <link href="__PUBLIC__/css/bootstrap.min.css" rel="stylesheet">
    <link href="__PUBLIC__/css/iconfont.css" rel="stylesheet">
    <script src="__PUBLIC__/js/jquery.min.js"></script>
    <!-- <script src="js/jquery.mobile.min.js"></script> -->
    <style type="text/css">
        html, body {
            font-family: 微软雅黑;
            /*background-color: #ECEDF2;*/
            background-image: url(__PUBLIC__/images/4.jpg);
            background-size: 100% 1080px;
            background-repeat: no-repeat;
            overflow-x: hidden;
        }

        ul li {
            list-style-type: none;
        }

        .head a {
            color: black;
            text-decoration: none;
        }

        .head a:link {
            color: black;
            text-decoration: none;
        }

        .head a:visited {
            color: black;
            text-decoration: none;
        }

        .head a:hover {
            color: black;
            text-decoration: none;
        }

        .head a:active {
            color: black;
            text-decoration: none;
        }

        .cursor-p {
            cursor: pointer;
        }

        .clearfix:after {
            content: '';
            display: block;
            clear: both;
            height: 0;
            visibility: hidden;
        }

        .head {
            width: 98%;
            height: 80px;
            color: white;
        }

        .head .left-tab {
            width: 100%;
            height: 80px;
        }

        .head .left-tab a {
            color: white;
        }

        .head .left-tab a:link {
            color: white;
        }

        .head .left-tab a:hover {
            color: white;
        }

        .head .left-tab a:active {
            color: white;
        }

        .head .left-tab a:visited {
            color: white;
        }

        .head .left-tab ul {
            margin-right: 10%;
            height: 80px;
        }

        .head .left-tab ul li {
            display: inline-block;
            margin: 0 5px;
            list-style-type: none;
            line-height: 80px;
            vertical-align: middle;
        }

        .head .left-tab .theme {
            width: 150px;
            height: 40px;
            background-color: white;
            position: absolute;
            z-index: 100;
            top: 60px;
            left: 0;
            margin-left: -40px;
            border-radius: 8px;
            box-shadow: 0 2px 2px rgba(0, 0, 0, 0.15), 0 8px 20px rgba(0, 0, 0, 0.19);
        }

        .head .left-tab .theme .theme-select {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            margin-left: 10px;
            margin-right: 10px;
            margin-top: 5px;
        }

        .head .date {
            width: 200px;
            height: 70px;
            left: 20%;
            top: 0;
            margin-top: 5px;
            vertical-align: middle;
            background-color: #5585DA;
            border-top: 1px solid white;
            border-bottom: 1px solid white;
            position: absolute;
        }

        .head .date-ball {
            width: 70px;
            height: 70px;
            border-radius: 50%;
            border: 1px solid white;
            position: absolute;
            margin-top: 5px;
            vertical-align: middle;
            left: 20%;
            top: 0;
            background-color: #5585DA;
        }

        .head .date p {
            margin: 0;
            text-align: center;
            font-weight: 900;
        }

        .main {
            width: 98%;
            padding-right: 90px;
        }

        .main .main-left {
            width: 250px;
            position: absolute;
            z-index: 0;
            /*background-color: red;*/
            font-weight: 900;
        }

        .main .main-left ul li {
            margin: 15px 0;
            color: white;
            cursor: pointer;
        }

        .main .main-left .title {
            color: white;
            font-size: 20px;
            font-weight: 900;
            margin-left: -10px;
        }

        .main .main-left .details-list li {
            background-color: white;
            margin: 15px 0;
            font-size: 14px;
        }

        .main .main-right {
            min-height: 700px;
            margin-left: 250px;
            background-color: white;
            box-shadow: 0 2px 2px rgba(0, 0, 0, 0.15), 0 8px 20px rgba(0, 0, 0, 0.19);
            position: relative;
            z-index: 10;
            border-radius: 10px;
        }

        .main .main-right .likepaper {
            width: 0;
            height: 0;
            border: 30px solid white;
            border-left-color: white;
            border-top-color: white;
            border-left-color: #5689D8;
            border-top-color: #5689D8;
            box-shadow: 0 1px 1px rgba(0, 0, 0, 0.3), -1px 1px 1px rgba(0, 0, 0, 0.2);
            position: absolute;
        }

        .main .main-right .hiddenbtn {
            height: 35px;
            width: 35px;
            border-radius: 50%;
            border: 1px solid #333333;
            cursor: pointer;
            margin: 8px 0 0 70px;
            position: absolute;
        }

        .main .main-right .hiddenbtn span {
            display: block;
            font-size: 20px;
            line-height: 30px;
            vertical-align: middle;
        }

        .main .main-right .circle {
            height: 5px;
            width: 5px;
            border-radius: 50%;
            background-color: black;
            display: inline-block;
        }

        .main .main-right .circle-name {
            display: inline-block;
        }

        .main .main-right .normal {

        }

        .main .main-right .details > div {
            display: none;
        }

        .main .main-right .details .details-info {
            padding: 40px;
            font-family: 宋体;
        }

        .main .main-right .details .team {
            max-width: 500px;
        }

        .main .main-right .details .team form > div {
            overflow: hidden;
            margin: 25px auto;
        }

        .search div {
            display: inline;
        }

        @media (max-width: 850px) {
            .main {
                padding-right: 10px;
            }
        }

        @media (max-width: 550px) {
            .main {
                padding-right: 0;
            }

            .main .main-right {
                min-width: 335px;
            }

            .head .date {
                display: none;
            }

            .head .date-ball {
                display: none;
            }
        }
    </style>
</head>
<body>
<div class="head clearfix">
    <div class="left-tab">
        <ul class="pull-right">
            <li class="cursor-p"><a href="{:U('user/center')}">欢迎您,会员 {$_user.u_name} 。</a></li>
            <li class="cursor-p"><a href="{:U('manage/center')}">返回</a></li>
            <li class="cursor-p"><a href="{:U('public/logout')}">注销登陆</a></li>
        </ul>
    </div>
    <div style="margin-left: -35px;" class="date-ball"></div>
    <div style="margin-left: 165px;" class="date-ball"></div>
    <div class="date">
        <p style="line-height: 25px;text-align: left;" id="year"></p>
        <p style="line-height: 45px;font-size: 28px;">
            <span id="hour"></span>：
            <span id="minutes"></span>：
            <span id="seconds"></span>
        </p>
    </div>
</div>
<div class="main clearfix">
    <div class="main-left pull-left">
        <ul style="display: none;" class="text-center details-list">
            <li>赛事规程</li>
            <li>赛事详情</li>
            <li>已报名列表</li>
            <li>代表队管理</li>
        </ul>
        <ul>
            <li class="title">搜索</li>
            <form action="" method="post">
                <li class="search">
                    <input type="text"
                           style="height: 36px;vertical-align: middle;width: 150px;color: black;display: inline;"
                           name="search"/>
                    <input type="submit" class="btn iconfont" value="&#xe601;"
                           style="color: #333333;margin-left: -15px;">
                </li>
            </form>
            <li class="title">赛种状态</li>
            <li onclick="changeTab($(this),'')" style="color: #ff9d24;"><a href="{:U('manage/signList')}">所有</a></li>
            <li><a href="{:U('manage/be_join')}">报名中（{$becount}）</a></li>
            <li><a href="{:U('manage/will_join')}">未开始（{$willcount}）</a></li>
            <li><a href="{:U('manage/end_join')}">报名结束（{$endcount}）</a></li>
        </ul>
    </div>
    <div class="main-right clearfix">
        <div class="clearfix" style="height: 65px;">
            <div class="pull-left likepaper"></div>
            <!-- 左上角的切换按钮  -->
            <div class="hiddenbtn text-center pull-left"
                 onmouseover="changeAttr($(this),{border:'1px solid #eabf75',color:'#eabf75'})"
                 onmouseout="changeAttr($(this),{border:'1px solid #333333',color:'#333333'})">
                <span class="glyphicon glyphicon-list"></span>
            </div>
        </div>
        <h5>{$serror}</h5>
        <div style="overflow-x: scroll;">
            <table class="table" id="allMatch" style="margin-top: 50px;overflow-x: hidden;">
                <tr style="background-color: #F2F3F7;">
                    <th>ID</th>
                    <th>赛事名称</th>
                    <th>竞赛日期</th>
                    <th>报名开始日期</th>
                    <th>报名截止时间</th>
                    <th>详细内容</th>
                </tr>
                <if condition="empty($search_results)">
                    <volist name="List" id="vo">
                        <if condition="($vo.all_e_time egt $time)and($vo.all_b_time elt $vo.all_e_time)">
                            <tr class="default">
                                <else condition="$vo.all_e_time lt $time"/>
                            <tr class="success">
                                <else/>
                            <tr class="danger">
                        </if>
                        <td>{$vo.all_id}</td>
                        <td>{$vo.all_name}</td>
                        <td>{$vo.all_start}</td>
                        <td>{$vo.all_b_time}</td>
                        <td>{$vo.all_e_time}</td>
                        <td><a href="{:U('manage/pro_detail',array('id'=>$vo['all_id']))}">进入</a></td>
                        </tr>
                    </volist>
                </if>
                <else>
                    <volist name="search_results" id="vol">
                        <if condition="($vo.all_e_time egt $time)and($vo.all_b_time elt $vo.all_e_time)">
                            <tr class="default">
                                <else condition="$vo.all_e_time lt $time"/>
                            <tr class="success">
                                <else/>
                            <tr class="danger">
                        </if>
                        <td>{$vol.all_id}</td>
                        <td>{$vol.all_name}</td>
                        <td>{$vol.all_start}</td>
                        <td>{$vol.all_b_time}</td>
                        <td>{$vol.all_e_time}</td>
                        <td>
                            <php>

                            </php>
                            <eq>

                            </eq>
                            <a href="{:U('manage/pro_detail',array('id'=>$vo['all_id']))}">进入</a>
                        </td>
                        </tr>
                    </volist>
                </else>
            </table>
        </div>
        {$pagestr}
        <div style="height: 80px;width: 100%;"></div>
    </div>
</div>
<script type="text/javascript">
    var c = 1;
    function changeAttr(obj, styles) {
        obj.css(styles);
    }
    function sideToggle() {
        if (c == 1) {
            $(".main-right").animate({
                marginLeft: "0"
            }, 300);
            c = -1;
        } else if (c == -1) {
            $(".main-right").animate({
                marginLeft: "250px"
            }, 300);
            c = 1;
        }
    }
    function changeTab(thisObj, targetClass) {
        thisObj.css({
            color: "#ff9d24"
        }).siblings().not(".title").css("color", "white");
        if (targetClass == '') {
            $("#allMatch").find("tr").css("display", "table-row");
        } else {
            $("#allMatch").find(targetClass).css("display", "table-row").siblings().css("display", "none").not(".success,.danger,.normal").css("display", "table-row");
        }
    }
    function countCheckbox() {
        var checkBox = document.getElementById("checkbox-group").getElementsByTagName("input"),
                count = 0;
        for (var i = 0; i < checkBox.length; i++) {
            if (checkBox[i].checked) {
                count++;
            }
        }
        if (count >= 3) {
            for (var i = 0; i < checkBox.length; i++) {
                if (true) {
                    checkBox[i].checked = false;
                }
            }
            alert("对不起，每组选手最多报三项");
        }
    }
    function getTime() {
        var d = new Date(),
                n = d.toLocaleDateString(),
                h = d.getHours(),
                m = d.getMinutes(),
                s = d.getSeconds();
        $("#year").text(n);
        $("#hour").text(h);
        $("#minutes").text(m);
        $("#seconds").text(s);
    }
    getTime();
    setInterval(getTime, 1000);
    function changeTheme(num) {
        $("html,body").css("background-image", "url(__PUBLIC__/images/" + num + ".jpg)");
        if (num == 1) {
            $(".date,.date-ball").css("background-color", "#61100D");
            $(".likepaper").css({
                borderLeftColor: "#61100D",
                borderTopColor: "#61100D"
            });
        }
        if (num == 2) {
            $(".date,.date-ball").css("background-color", "#343237");
            $(".likepaper").css({
                borderLeftColor: "#343237",
                borderTopColor: "#343237"
            });
        }
        if (num == 4) {
            $(".date,.date-ball").css("background-color", "#5585DA");
            $(".likepaper").css({
                borderLeftColor: "#5585DA",
                borderTopColor: "#5585DA"
            });
        }
    }
    $(".hiddenbtn").on("click", sideToggle);
    // $("body:not(.table)").on("swipeleft",function(){
    // 	c = 1;
    // 	sideToggle();
    // });
    // $("body:not(.table)").on("swiperight",function(){
    // 	c = -1;
    // 	sideToggle();
    // });
</script>
</body>
</html>